Skip to content

Test/df 380 improve notify coverage#207

Merged
whitewaterdesign merged 6 commits intomainfrom
test/DF-380--improve-notify-coverage
Sep 23, 2025
Merged

Test/df 380 improve notify coverage#207
whitewaterdesign merged 6 commits intomainfrom
test/DF-380--improve-notify-coverage

Conversation

@whitewaterdesign
Copy link
Copy Markdown
Contributor

@whitewaterdesign whitewaterdesign commented Sep 23, 2025

Proposed change

Empty values in main fields on Forms Adapter v1 message are being clipped by JSON.stringify and JSON.parse. This ticket replaces the undefined value with null, to allow correct serialisation for theforms-notify-listener. This can them be turned back into undefined.

Jira ticket: https://eaflood.atlassian.net/browse/DF-512

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Misc. (documentation, build updates, etc)

Checklist

  • You have executed this code locally and it performs as expected.
  • You have added tests to verify your code works.
  • You have added code comments and JSDoc, where appropriate.
  • There is no commented-out code.
  • You have added developer docs in README.md and docs/* (where appropriate, e.g. new features).
  • The tests are passing (npm run test).
  • The linting checks are passing (npm run lint).
  • The code has been formatted (npm run format).

@whitewaterdesign whitewaterdesign requested review from a team and davidjamesstone September 23, 2025 13:01
Copy link
Copy Markdown
Contributor

@jbarnsley10 jbarnsley10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

export interface FormAdapterSubmissionMessageData {
main: Record<string, RichFormValue>
main: Record<string, RichFormValue | null>
repeaters: Record<string, Record<string, RichFormValue>[]>
Copy link
Copy Markdown
Contributor

@davidjamesstone davidjamesstone Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will repeaters not also need to allow nulls?

repeaters: Record<string, Record<string, RichFormValue | null>[]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can do, it's not set at the moment as there is no requirement

@sonarqubecloud
Copy link
Copy Markdown

@whitewaterdesign whitewaterdesign merged commit 20ae049 into main Sep 23, 2025
10 checks passed
@whitewaterdesign whitewaterdesign deleted the test/DF-380--improve-notify-coverage branch September 23, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants